package com.example.spring.filter;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.CommandLineRunner;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

/**
 * 实现spring boot CommandLineRunner接口，在项目启动时会进行加载
 * 可以在这里实现一些项目启动时的加载项，如码表等
 * Created by admin on 6/13/17.
 */
@Component
@Order(1)
public class StartupFilter implements CommandLineRunner{
    private Logger logger = LoggerFactory.getLogger(StartupFilter.class);

    @Override
    public void run(String... strings) throws Exception {

        logger.info("======================================================================");
        logger.info("");
        logger.info("                            欢迎使用微服务                               ");
        logger.info("");
        logger.info("======================================================================");

    }
}
